import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-progress-bar',
  templateUrl: './progress-bar.component.html',
  styleUrls: ['./progress-bar.component.scss'],
})
export class ProgressBarComponent implements OnInit {

  @Input() tagData:any;
  selectWidth:string;
  noSelectWidth:string;
  constructor() { }

  ngOnInit() {
    this.selectWidth = this.tagData.data.currentProgress / this.tagData.data.totalProgress * 100 +'%';
    this.noSelectWidth = (1 - this.tagData.data.currentProgress / this.tagData.data.totalProgress) * 100 +'%';
  }

}
